]> dgit.raspbian.org Git - ostree.git/commit
static-delta: Drop unreliable usize-based margin heuristic
authorColin Walters <walters@verbum.org>
Mon, 17 Aug 2026 23:29:35 +0000 (19:29 -0400)
committerColin Walters <walters@verbum.org>
Tue, 18 Aug 2026 13:17:25 +0000 (09:17 -0400)
commit3cac5a941b10c317c2fd3c953d2fe4905ff39e31
treecffd5c98d6bf6c7216566881b9990b69be90dcdd
parent1e90125e786a0e7090d3e198469b008f7144f48b
static-delta: Drop unreliable usize-based margin heuristic

The per-object margin formula added in the previous commit tries to
bound the gap between a delta part's declared usize (sum of
reconstructed object sizes) and its actual decompressed payload size
by scaling with the number of objects in the part.  That's the wrong
axis: the biggest source of that gap is the bsdiff patch stream for
bsdiff'd objects, which scales with object *content* size, not object
*count*.  A part with just one or two large bsdiff'd objects (e.g. a
big shared library that changed significantly between releases) blows
right past the margin, causing legitimate deltas to be rejected at
apply time.  This is the root cause of
https://github.com/ostreedev/ostree/issues/3635.

Just drop it, we'll work to add a more reliable limit later.

Assisted-by: https://github.com/cgwalters/cgwalters#llms
Signed-off-by: Colin Walters <walters@verbum.org>
src/libostree/ostree-repo-pull.c
src/libostree/ostree-repo-static-delta-core.c
src/libostree/ostree-repo-static-delta-private.h